process {
    withName: "CHROMAP_CHROMAP" {
        ext.args = "--SAM"
    }

    withName: "FASTQ_ALIGN_CHROMAP:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_.*" {
        ext.prefix = { "${meta.id}.sorted" }
    }

    withName: "FASTQ_ALIGN_CHROMAP:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*'" {
        ext.prefix = { "${meta.id}.sorted.bam" }
    }
}
